---
title: terrateam apply
description: Execute the apply workflow against a stored plan file for changes in a pull request
---

Apply previously planned Terraform changes to update your infrastructure.

## Usage

```
terrateam apply [tag-query]
```

## Prerequisites

- A successful `terrateam plan` must be run first
- Apply requirements must be met (unless using apply-force)
- User must have apply permissions

## Examples

### Apply All Plans
```
terrateam apply
```

### Target Specific Resources

```bash
# Apply a specific directory
terrateam apply dir:staging

# Apply a specific workspace  
terrateam apply workspace:production

# Apply multiple directories
terrateam apply dir:app or dir:database

# Complex tag queries
terrateam apply production and dir:us-east-1
```

## Tag Query Support

The apply command supports [tag queries](/reference/configuration/tag-queries) to filter which plans to apply:

- `dir:<path>` - Target specific directory
- `workspace:<name>` - Target specific workspace  
- Tags can be referenced directly (e.g., `production`, `staging`)
- Logical operators: `and`, `or`, `not`

## Apply Requirements

The apply command respects configured requirements before allowing changes to be applied. See [apply-requirements](/reference/configuration/apply-requirements) for configuration details.

## Workflow Configuration

The apply command executes the workflow defined in your `.terrateam/config.yml`. See [workflow configuration](/reference/configuration/workflows) for customization options.

## Access Control

Apply permissions can be restricted using [access control](/reference/configuration/access-control).

## Related Commands

- [terrateam plan](/reference/commands/plan) - Create a plan before applying
- [terrateam apply-force](/reference/commands/apply-force) - Apply without meeting requirements
- [terrateam apply-autoapprove](/reference/commands/apply-autoapprove) - Plan and apply in one step
